import request from '@/utils/request'

// 查询检测任务列表
export function listDetectTask(query) {
  return request({
    url: '/geek/detectTask/list',
    method: 'get',
    params: query
  })
}

// 查询检测任务详情
export function getDetectTask(taskId) {
  return request({
    url: '/geek/detectTask/' + taskId,
    method: 'get'
  })
}

// 新增检测任务
export function addDetectTask(data) {
  return request({
    url: '/geek/detectTask',
    method: 'post',
    data: data
  })
}

// 修改检测任务
export function updateDetectTask(data) {
  return request({
    url: '/geek/detectTask',
    method: 'put',
    data: data
  })
}

// 删除检测任务
export function delDetectTask(taskId) {
  return request({
    url: '/geek/detectTask/' + taskId,
    method: 'delete'
  })
}

// 导出检测任务
export function exportDetectTask(query) {
  return request({
    url: '/geek/detectTask/export',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
} 